<template>
  <div class="wrap">
    <div class="title">{{resAgreement.title}}</div>
    <div class="info" v-html="resAgreement.content"></div>
  </div>
</template>

<script>
import { Switch } from "vant";
import { apiAboutUs } from "@/request/api"; // api接口
export default {
  name: "App",
  data() {
    return {
      resAgreement: "",
    };
  },
  mounted() {
    document.querySelector("body").setAttribute("style", "background-color:#F2F4FA");
    this.getAgreement();
  },
  methods: {
     //获取隐私协议：
    getAgreement() {
      apiAboutUs({}).then((res) => {
        this.resAgreement = res.data
      });
    },
  },
  created() {},
  components: {
    [Switch.name]: Switch,
  },
};
</script>

<style scoped>
.wrap{
    width: calc(95% - 30px );
    background-color: #fff;
    margin: 20px auto;
    border-radius: 15px;
    padding: 15px;
}
.title {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}
.time {
    font-size: 12px;
    color: #666;
    margin: 10px 0px;
}
.info {
    color: #000;
    font-size: 14px;
}
</style>
